<!DOCTYPE HTML>
<html>
<head>
<title>Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />

{include file="Public/header" /}

</head>

<body>

{include file="Public/nav" /}
<div style="min-height: 600px;border: 1px solid black">

<form method="post" action="{:url('Home/Index/editPassword')}" >
	
<h3 align="center" style="margin-top: 5%;color:#f74a2a">修改密码</h3>
<input type="password" name="newPass" id="newPass" placeholder="输入新密码" style="width: 40%;height: 50px;border: 2px solid #f74a2a;border-radius: 10px;margin-left: 30%;margin-top: 5%;text-align: center""; required>

<input type="password" name="confirmPass" id="confirmPass" placeholder="请再次确认密码" style="width: 40%;height: 50px;border: 2px solid #f74a2a;border-radius: 10px;margin-left: 30%;margin-top: 5%;text-align: center"; onkeyup="checkPassword();"><span id="talk" style="width: 40%;margin-left: 30%;margin-top: 5%;text-align: center";></span>
<input type="submit" name="提交" id="submit" style="width: 20%;height: 50px;margin-left: 40%;background-color: white;border: 2px solid #f74a2a;margin-top: 5%;border-radius: 10px;color: #f74a2a;font-size: 1.3em" required >
</form>

</div>
{include file="Public/footer" /}

</body>
 <script type="text/javascript">
	function checkPassword() {
		var newPass=document.getElementById('newPass').value;
		var confirmPass=document.getElementById('confirmPass').value;
        if(newPass!=confirmPass)
        {
             document.getElementById('talk').innerHTML="<h4 style='color:red;'>两次密码输入不同啊，小心点</h4>";
            document.getElementById('submit').disabled=true;

        }
        else{
              document.getElementById('talk').innerHTML="<h4 style='color:green;'>两次密码输入相同喽</h4>";
            document.getElementById('submit').disabled=false;
        }



    }
</script> 
</html>	